package com.hmall.item.config;

import com.hmall.item.interceptor.Admininterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * TODO
 *
 * @Author mr.ma
 * @Date 2024/11/22 14:36
 */
@Configuration
public class webMvcConfig implements WebMvcConfigurer {

    @Autowired
    private Admininterceptor admininterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(admininterceptor).addPathPatterns("/**");

    }
}
